Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heimdalljs

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heimdalljs

Structured instrumentation library

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created

What is heimdalljs?

HeimdallJS is a lightweight performance monitoring library for JavaScript applications. It allows developers to track and measure the performance of their code by creating performance metrics and visualizing them. This can be particularly useful for identifying bottlenecks and optimizing the performance of web applications.

What are heimdalljs's main functionalities?

Creating a Monitor

This feature allows you to create a performance monitor that tracks the execution time of a specific block of code. You start the monitor before the code block and stop it after the code block.

const heimdall = require('heimdalljs');
const monitor = heimdall.start('my-monitor');
// Your code here
monitor.stop();

Tracking Performance Metrics

This feature allows you to track specific performance metrics by starting and stopping named metrics. You can then retrieve and log the statistics for these metrics.

const heimdall = require('heimdalljs');
heimdall.start('my-metric');
// Your code here
heimdall.stop('my-metric');
const stats = heimdall.statsFor('my-metric');
console.log(stats);

Visualizing Performance Data

This feature allows you to visualize the performance data collected by HeimdallJS. You can convert the performance data into a JSON format and log it for further analysis.

const heimdall = require('heimdalljs');
const monitor = heimdall.start('my-monitor');
// Your code here
monitor.stop();
const tree = heimdall.toJSON();
console.log(JSON.stringify(tree, null, 2));

Other packages similar to heimdalljs

Keywords

FAQs

Package last updated on 16 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc